package cn.attaching.action;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.ServletActionContext;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * 作者：高杰 创建于 16-9-26
 * Email：790121857@qq.com
 */
public class HelloPageAction extends ActionSupport {

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    private String username;

    public String execute(){
        ActionContext.getContext().getSession().put("hello","Hello ,"+getUsername());
        HttpServletRequest request = ServletActionContext.getRequest();
        HttpServletResponse response = ServletActionContext.getResponse();
        String query = request.getQueryString();
        return SUCCESS;
    }
}
